function getJSON(url,cbFn){
    return new Promise((resolve,reject)=>{
          let re=/callback=([^&]+)/;
    url=url.replace(re,function($0,$1){
        return 'callback='+$1+'_'+Math.random().toString().substring(2);
    })
    console.log(url);    
    let fnName=url.match(re)[1];
    console.log(fnName);    
    window[fnName]=cbFn;
    let script=document.createElement('script');
    script.src=url;
    document.body.appendChild(script);
    script.onload=function(){
        document.body.removeChild(this);
        delete window[fnName];     
        console.log(1);
        
    } 
    resolve()
    })
  
}
export default getJSON

